<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>

        #idDiv h2{
            color: black;
        }

        div #idH2 {
            color: red ;
        }
    </style>
</head>
<body>
<div class="cDiv" id="idDiv">
    <h2 class="cH2" id="idH2">这里是一段文字</h2>
</div>
</body>
</html>